package com.bankwel.j3d.ui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JPanel;

import com.bankwel.j3d.core.J3dMatrix;
import com.bankwel.j3d.model.Object3d;

public final class J3dProxy implements ActionListener {

	private Object3d obj;
	private JPanel panel;
	private J3dMatrix action;

	public J3dProxy(Object3d obj, JPanel panel, J3dMatrix action) {
		super();
		this.obj = obj;
		this.panel = panel;
		this.setAction(action);
	}

	public Object3d getObj() {
		return obj;
	}

	public void setObj(Object3d obj) {
		this.obj = obj;
	}

	public JPanel getPanel() {
		return panel;
	}

	public void setPanel(J3dPanel panel) {
		this.panel = panel;
	}

	public J3dMatrix getAction() {
		return action;
	}

	public void setAction(J3dMatrix action) {
		this.action = action;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO
		obj.excute(action);
		panel.repaint();
	}

}
